package com.czkt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author jobob
 * @since 2024-06-18
 */
@Accessors(chain = true)
public class SalChance implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @TableId(value = "chc_id", type = IdType.AUTO)
    private Long chcId;

    /**
     * 机会来源
     */
    private String chcSource;

    /**
     * 客户名称
     */
    private String chcCustName;

    /**
     * 概要
     */
    private String chcTitle;

    /**
     * 成功机率
     */
    private Integer chcRate;

    /**
     * 负责人
     */
    private String chcLinkman;

    /**
     * 公司电话
     */
    private String chcTel;

    /**
     * 机会描述
     */
    private String chcDesc;

    /**
     * 创建人编号
     */
    private Long chcCreateId;

    /**
     * 创建人姓名
     */
    private String chcCreateBy;

    /**
     * 创建时间
     */
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime chcCreateDate;

    /**
     * 指派人编号
     */
    private Long chcDueId;

    /**
     * 指派人姓名
     */
    private String chcDueTo;

    /**
     * 指派时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date chcDueDate;

    /**
     * 销售机会状态
     */
    private String chcStatus;


    public SalChance() {
    }

    public SalChance( Long chcId, String chcSource, String chcCustName, String chcTitle, Integer chcRate, String chcLinkman, String chcTel, String chcDesc, Long chcCreateId, String chcCreateBy, LocalDateTime chcCreateDate, Long chcDueId, String chcDueTo, Date chcDueDate, String chcStatus) {
        this.chcId = chcId;
        this.chcSource = chcSource;
        this.chcCustName = chcCustName;
        this.chcTitle = chcTitle;
        this.chcRate = chcRate;
        this.chcLinkman = chcLinkman;
        this.chcTel = chcTel;
        this.chcDesc = chcDesc;
        this.chcCreateId = chcCreateId;
        this.chcCreateBy = chcCreateBy;
        this.chcCreateDate = chcCreateDate;
        this.chcDueId = chcDueId;
        this.chcDueTo = chcDueTo;
        this.chcDueDate = chcDueDate;
        this.chcStatus = chcStatus;
    }

    /**
     * 获取
     * @return chcId
     */
    public Long getChcId() {
        return chcId;
    }

    /**
     * 设置
     * @param chcId
     */
    public void setChcId(Long chcId) {
        this.chcId = chcId;
    }

    /**
     * 获取
     * @return chcSource
     */
    public String getChcSource() {
        return chcSource;
    }

    /**
     * 设置
     * @param chcSource
     */
    public void setChcSource(String chcSource) {
        this.chcSource = chcSource;
    }

    /**
     * 获取
     * @return chcCustName
     */
    public String getChcCustName() {
        return chcCustName;
    }

    /**
     * 设置
     * @param chcCustName
     */
    public void setChcCustName(String chcCustName) {
        this.chcCustName = chcCustName;
    }

    /**
     * 获取
     * @return chcTitle
     */
    public String getChcTitle() {
        return chcTitle;
    }

    /**
     * 设置
     * @param chcTitle
     */
    public void setChcTitle(String chcTitle) {
        this.chcTitle = chcTitle;
    }

    /**
     * 获取
     * @return chcRate
     */
    public Integer getChcRate() {
        return chcRate;
    }

    /**
     * 设置
     * @param chcRate
     */
    public void setChcRate(Integer chcRate) {
        this.chcRate = chcRate;
    }

    /**
     * 获取
     * @return chcLinkman
     */
    public String getChcLinkman() {
        return chcLinkman;
    }

    /**
     * 设置
     * @param chcLinkman
     */
    public void setChcLinkman(String chcLinkman) {
        this.chcLinkman = chcLinkman;
    }

    /**
     * 获取
     * @return chcTel
     */
    public String getChcTel() {
        return chcTel;
    }

    /**
     * 设置
     * @param chcTel
     */
    public void setChcTel(String chcTel) {
        this.chcTel = chcTel;
    }

    /**
     * 获取
     * @return chcDesc
     */
    public String getChcDesc() {
        return chcDesc;
    }

    /**
     * 设置
     * @param chcDesc
     */
    public void setChcDesc(String chcDesc) {
        this.chcDesc = chcDesc;
    }

    /**
     * 获取
     * @return chcCreateId
     */
    public Long getChcCreateId() {
        return chcCreateId;
    }

    /**
     * 设置
     * @param chcCreateId
     */
    public void setChcCreateId(Long chcCreateId) {
        this.chcCreateId = chcCreateId;
    }

    /**
     * 获取
     * @return chcCreateBy
     */
    public String getChcCreateBy() {
        return chcCreateBy;
    }

    /**
     * 设置
     * @param chcCreateBy
     */
    public void setChcCreateBy(String chcCreateBy) {
        this.chcCreateBy = chcCreateBy;
    }

    /**
     * 获取
     * @return chcCreateDate
     */
    public LocalDateTime getChcCreateDate() {
        return chcCreateDate;
    }

    /**
     * 设置
     * @param chcCreateDate
     */
    public void setChcCreateDate(LocalDateTime chcCreateDate) {
        this.chcCreateDate = chcCreateDate;
    }

    /**
     * 获取
     * @return chcDueId
     */
    public Long getChcDueId() {
        return chcDueId;
    }

    /**
     * 设置
     * @param chcDueId
     */
    public void setChcDueId(Long chcDueId) {
        this.chcDueId = chcDueId;
    }

    /**
     * 获取
     * @return chcDueTo
     */
    public String getChcDueTo() {
        return chcDueTo;
    }

    /**
     * 设置
     * @param chcDueTo
     */
    public void setChcDueTo(String chcDueTo) {
        this.chcDueTo = chcDueTo;
    }

    /**
     * 获取
     * @return chcDueDate
     */
    public String getChcDueDate() throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(chcDueDate);
    }

    /**
     * 设置
     * @param chcDueDate
     */
    public void setChcDueDate(Date chcDueDate) {
        this.chcDueDate = chcDueDate;
    }

    /**
     * 获取
     * @return chcStatus
     */
    public String getChcStatus() {
        return chcStatus;
    }

    /**
     * 设置
     * @param chcStatus
     */
    public void setChcStatus(String chcStatus) {
        this.chcStatus = chcStatus;
    }

    public String toString() {
        return "SalChance{serialVersionUID = " + serialVersionUID + ", chcId = " + chcId + ", chcSource = " + chcSource + ", chcCustName = " + chcCustName + ", chcTitle = " + chcTitle + ", chcRate = " + chcRate + ", chcLinkman = " + chcLinkman + ", chcTel = " + chcTel + ", chcDesc = " + chcDesc + ", chcCreateId = " + chcCreateId + ", chcCreateBy = " + chcCreateBy + ", chcCreateDate = " + chcCreateDate + ", chcDueId = " + chcDueId + ", chcDueTo = " + chcDueTo + ", chcDueDate = " + chcDueDate + ", chcStatus = " + chcStatus + "}";
    }
}
